<!DOCTYPE html>
<!-- saved from url=(0081)http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
    <title>Using jQuery AJAX with Python's Bottle - Stack Overflow</title>
    <link rel="shortcut icon" href="http://cdn.sstatic.net/stackoverflow/img/favicon.ico">
    <link rel="apple-touch-icon image_src" href="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png">
    <link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="http://stackoverflow.com/opensearch.xml">
    
    <script type="text/javascript" async="" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/adzerk1_2_4_43,adzerk2_2_17_45"></script><script type="text/javascript" async="" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/ga.js"></script><script type="text/javascript" async="" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/quant.js"></script><script type="text/javascript" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/jquery.min.js"></script>
    <script type="text/javascript" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/stub.js"></script>
    <link rel="stylesheet" type="text/css" href="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/all.css">
    
    <link rel="canonical" href="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/Using jQuery AJAX with Python's Bottle - Stack Overflow.html">
    <link rel="alternate" type="application/atom+xml" title="Feed for question &#39;Using jQuery AJAX with Python&#39;s Bottle&#39;" href="http://stackoverflow.com/feeds/question/13098494">
    <script type="text/javascript">
        
        StackExchange.ready(function () {
            StackExchange.using("postValidation", function () {
                StackExchange.postValidation.initOnBlurAndSubmit($('#post-form'), 2, 'answer');
            });

            
            StackExchange.question.init({showAnswerHelp:true,totalCommentCount:2,shownCommentCount:2,highlightColor:'#F4A83D',backgroundColor:'#FFF',questionId:13098494});

            styleCode();

                StackExchange.realtime.subscribeToQuestion('1', '13098494');
            
                
        });
    </script>


    <script type="text/javascript">
        StackExchange.init({"stackAuthUrl":"https://stackauth.com","serverTime":1372563574,"styleCode":true,"enableUserHovercards":true,"site":{"name":"Stack Overflow","description":"Q&A for professional and enthusiast programmers","isNoticesTabEnabled":true,"recaptchaPublicKey":"6LdchgIAAAAAAJwGpIzRQSOFaO0pU6s44Xt8aTwc","enableSocialMediaInSharePopup":true},"user":{"fkey":"2d0aec7595cc73e90ef39640b48e41c2","isAnonymous":true}});
        StackExchange.using.setCacheBreakers({"js/prettify-full.js":"6c261bebf56a","js/moderator.js":"82e0bdb93733","js/full-anon.js":"761e0ff892e6","js/full.js":"96302e0b9d3d","js/wmd.js":"2f79c03846d5","js/third-party/jquery.autocomplete.min.js":"e5f01e97f7c3","js/mobile.js":"e8e23ad37820","js/help.js":"6e6623243cf6","js/tageditor.js":"450c9e8426fc","js/tageditornew.js":"b6c68ad4c7dd","js/inline-tag-editing.js":"8e84e8a137f7","js/revisions.js":"7273bb714bba","js/review.js":"aa4e9e92f60d","js/tagsuggestions.js":"aa48ef6154df","js/post-validation.js":"bb996020492a","js/explore-qlist.js":"1c5bbd79b562"});
        
    </script>
    <script type="text/javascript">
        StackExchange.using("gps", function() {
             StackExchange.gps.init(true);
        });
    </script>
    
        <script type="text/javascript">
            StackExchange.ready(function () {
                $('#nav-tour').click(function () {
                    StackExchange.using("gps", function() {
                        StackExchange.gps.track("aboutpage.click", { aboutclick_location: "headermain" }, true);
                    });
                });
            });
        </script>
<script async="" type="text/javascript" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/full-anon.js"></script><script async="" type="text/javascript" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/post-validation.js"></script><script async="" type="text/javascript" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/prettify-full.js"></script><script type="text/javascript" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/adFeedback.js"></script><link rel="stylesheet" href="http://static.adzerk.net/Extensions/adFeedback.css"><link href="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/sidebar.min.css" type="text/css" rel="stylesheet"></head>
<body class="question-page" style="">
    <noscript>&lt;div id="noscript-padding"&gt;&lt;/div&gt;</noscript>
    <div id="notify-container"></div>
    <div id="overlay-header"></div>
    <div id="custom-header"></div>

    <div class="container">
        <div id="header" class="headeranon">
            <div id="portalLink">
                <a class="genu" onclick="StackExchange.ready(function(){genuwine.click();});return false;">Stack Exchange</a>
            </div>
            <div id="topbar">
                <div id="hlinks">
                    
<span id="hlinks-user"></span>
<span id="hlinks-nav">                        <a href="http://stackoverflow.com/users/login?returnurl=%2fquestions%2f13098494%2fusing-jquery-ajax-with-pythons-bottle">sign up</a>

 <span class="lsep">|</span>
                    <a href="http://stackoverflow.com/users/login?returnurl=%2fquestions%2f13098494%2fusing-jquery-ajax-with-pythons-bottle">log in</a>

 <span class="lsep">|</span>
                    <a href="http://careers.stackoverflow.com/">careers 2.0</a>

 <span class="lsep">|</span>
</span>
<span id="hlinks-custom"></span>
                </div>
                <div id="hsearch">
                    <form id="search" action="http://stackoverflow.com/search" method="get" autocomplete="off">
                        <div>
                            <input autocomplete="off" name="q" class="textbox" placeholder="search" tabindex="1" type="text" maxlength="240" size="28" value="">
                        </div>
                    </form>
                </div>
            </div>
            <br class="cbt">
            <div id="hlogo">
                <a href="http://stackoverflow.com/">
                    Stack Overflow
                </a>
            </div>
            <div id="hmenus">
                <div class="nav mainnavs mainnavsanon">
                    <ul>
                            <li class="youarehere"><a id="nav-questions" href="http://stackoverflow.com/questions">Questions</a></li>
                            <li><a id="nav-tags" href="http://stackoverflow.com/tags">Tags</a></li>
                            <li><a id="nav-tour" href="http://stackoverflow.com/about">Tour</a></li>
                            <li><a id="nav-users" href="http://stackoverflow.com/users">Users</a></li>
                    </ul>
                </div>
                <div class="nav askquestion">
                    <ul>
                        <li>
                            <a id="nav-askquestion" href="http://stackoverflow.com/questions/ask">Ask Question</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        



        <div id="content">
            

<div itemscope="" itemtype="http://schema.org/Article">
<link itemprop="image" href="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png">
<!--googleoff: snippet-->
<div id="herobox-mini">
    <div id="hero-content">
        <span id="controls">
            <a href="http://stackoverflow.com/about" id="tell-me-more" class="button">Tell me more</a>
            <span id="close"><a title="click to dismiss">×</a></span>
        </span>
        <div id="blurb">
            <span id="site-name">Stack Overflow</span> is a question and answer site for 
            professional and enthusiast programmers. It's 100% free, no registration required.
        </div>        
    </div>
    <script>
        $('#tell-me-more').click(function () {
            var clickSource = $("body").attr("class") + '-mini';
            if ($("body").hasClass("questions-page")) {
                clickSource = 'questionpagemini';
            }
            if ($("body").hasClass("home-page")) {
                clickSource = 'homepagemini';
            }

            StackExchange.using("gps", function () {
                StackExchange.gps.track("aboutpage.click", { aboutclick_location: clickSource } , true);
            });
        });
        $('#herobox-mini #close').click(function () {
            StackExchange.using("gps", function () {
                StackExchange.gps.track("hero.action", { hero_action_type: "close" }, true);
            });
            $.cookie("hero", "none", { path: "/" });
            var $hero = $("#herobox-mini");
            $hero.slideUp('fast', function () { $hero.remove(); });
            return false;
        });
    </script>
</div>
<!--googleon: snippet-->
<div id="question-header">
    <h1 itemprop="name"><a href="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/Using jQuery AJAX with Python's Bottle - Stack Overflow.html" class="question-hyperlink">Using jQuery AJAX with Python's Bottle</a></h1>
</div>
<div id="mainbar">



<div class="question" data-questionid="13098494" id="question">
    
                <div class="everyonelovesstackoverflow adzerk-vote" id="adzerk1"><a href="http://engine.adzerk.net/r?e=eyJhdiI6NDE0LCJhdCI6NCwiY20iOjg0NywiY2giOjExNzgsImNyIjo1OTE5LCJkaSI6ImQzYjc2ZjkzNjkyODRiNzRhNjAwYjg4N2Y2MzZhNDI5IiwiZG0iOjEsImZjIjo4ODA1LCJmbCI6MjQ0NCwia3ciOiJqcXVlcnkscHl0aG9uLGFqYXgsYm90dGxlIiwibnciOjIyLCJyZiI6Imh0dHBzOi8vd3d3Lmdvb2dsZS5jb20uaGsvIiwicnYiOjAsInByIjoxNTY4LCJzdCI6ODI3Nywiem4iOjQzLCJ1ciI6Imh0dHA6Ly9jYXJlZXJzLnN0YWNrb3ZlcmZsb3cuY29tLyJ9&s=Fh4gEDVFAzWBPaq41wdews2TD18" rel="nofollow" target="_blank" title=""><img src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/4c4f1be011a447efbce49c1811022e7a.png" title="" alt="" border="0" width="728" height="90"></a><div class="adzerk-vote-controls" style="display:none;"><div class="adzerk-vote-option adzerk-vote-up"><div class="adzerk-vote-icon"></div></div><div class="adzerk-vote-option adzerk-vote-down"><div class="adzerk-vote-icon"></div></div></div><div class="adzerk-vote-survey" style="display:none;"><form><span>No problem. We won't show you that ad again. Why didn't you like it?</span><ul><li><label><input type="radio" value="12" name="downvoteReason">Uninteresting</label></li><li><label><input type="radio" value="13" name="downvoteReason">Misleading</label></li><li><label><input type="radio" value="14" name="downvoteReason">Offensive</label></li><li><label><input type="radio" value="15" name="downvoteReason">Repetitive</label></li></ul><a href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#" class="adzerk-vote-cancel">Oops! I didn't mean to do this.</a></form></div><img height="0px" width="0px" border="0" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/i.gif"></div>


    <table>
        <tbody><tr>
            <td class="votecell">
                

<div class="vote">
    <input type="hidden" value="13098494">
    <a class="vote-up-off" title="This question shows research effort; it is useful and clear">up vote</a>
    <span class="vote-count-post ">0</span>
    <a class="vote-down-off" title="This question does not show any research effort; it is unclear or not useful">down vote</a>
    
    <a class="star-off" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#" title="This is a favorite question (click again to undo)">favorite</a>
    <div class="favoritecount"><b></b></div>   

</div>

            </td>
            
<td class="postcell">
<div>
    <div class="post-text" itemprop="description">
        <p>I'm trying to figure out how to use jQuery AJAX with Python's Bottle module.</p>

<p>Here is my initial attempt but it isn't working and I'm really hitting a wall (been programming all day and my brain is a bit fried):</p>

<pre class="default prettyprint prettyprinted" style=""><code><span class="pln">    </span><span class="kwd">from</span><span class="pln"> bottle </span><span class="kwd">import</span><span class="pln"> route</span><span class="pun">,</span><span class="pln"> request</span><span class="pun">,</span><span class="pln"> run</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">get</span><span class="pln">

</span><span class="lit">@route</span><span class="pun">(</span><span class="str">'/form'</span><span class="pun">)</span><span class="pln">
</span><span class="kwd">def</span><span class="pln"> construct_form</span><span class="pun">():</span><span class="pln">
    </span><span class="kwd">return</span><span class="pln"> </span><span class="str">'''

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        $(document).ready(function() {
            $('</span><span class="pln">form</span><span class="str">').submit(function(e) {
                $.ajax({
                    type: '</span><span class="pln">POST</span><span class="str">',
                    url: '</span><span class="pun">/</span><span class="pln">ajax</span><span class="str">',
                    data: $(this).serialize(),
                    success: function(response) {
                        $('</span><span class="com">#ajaxP').html(response);</span><span class="pln">
                    </span><span class="pun">}</span><span class="pln">
                </span><span class="pun">});</span><span class="pln">
                e</span><span class="pun">.</span><span class="pln">preventDefault</span><span class="pun">();</span><span class="pln">
            </span><span class="pun">});</span><span class="pln">
        </span><span class="pun">});</span><span class="pln">
    </span><span class="pun">&lt;/</span><span class="pln">script</span><span class="pun">&gt;</span><span class="pln">
</span><span class="pun">&lt;/</span><span class="pln">head</span><span class="pun">&gt;</span><span class="pln">
</span><span class="str">&lt;body&gt;</span><span class="pln">
    </span><span class="pun">&lt;</span><span class="pln">form method</span><span class="pun">=</span><span class="str">"POST"</span><span class="pln"> action</span><span class="pun">=</span><span class="str">"/ajax"</span><span class="pun">&gt;</span><span class="pln">
        </span><span class="pun">&lt;</span><span class="pln">input id</span><span class="pun">=</span><span class="str">"ajaxTextbox"</span><span class="pln"> name</span><span class="pun">=</span><span class="str">"text"</span><span class="pln"> type</span><span class="str">"text"</span><span class="pln"> </span><span class="pun">/&gt;</span><span class="pln">
        </span><span class="pun">&lt;</span><span class="pln">input id</span><span class="pun">=</span><span class="str">"ajaxButton"</span><span class="pln"> type</span><span class="pun">=</span><span class="str">"button"</span><span class="pln"> value</span><span class="pun">=</span><span class="str">"Submit"</span><span class="pln"> </span><span class="pun">/&gt;</span><span class="pln">
    </span><span class="pun">&lt;/</span><span class="pln">form</span><span class="pun">&gt;</span><span class="pln">
    </span><span class="pun">&lt;</span><span class="pln">p id</span><span class="pun">=</span><span class="str">"ajaxP"</span><span class="pun">&gt;</span><span class="typ">Nothing</span><span class="pln"> to see here</span><span class="pun">.&lt;/</span><span class="pln">p</span><span class="pun">&gt;</span><span class="pln">
</span><span class="pun">&lt;/</span><span class="pln">body</span><span class="pun">&gt;</span><span class="pln">
</span><span class="pun">&lt;/</span><span class="pln">html</span><span class="pun">&gt;</span><span class="pln">

    </span><span class="str">'''

@route('</span><span class="pun">/</span><span class="pln">ajax</span><span class="str">', method='</span><span class="pln">POST</span><span class="str">')
def ajaxtest():
    theText = request.forms.text
    if theText:
        return theText
    return "You didn'</span><span class="pln">t type anything</span><span class="pun">.</span><span class="str">"

run(host = 'localhost', port = '8080')</span></code></pre>

<p>Basically, what I want to be able to do is enter text into the textbox, click the button, and have the innerHTML of "ajaxP" change to the entered text.</p>

<p>No errors, it just doesn't do anything when I push the button.</p>

<p>Any help?</p>

<hr>

<h3><strong>SOLVED</strong>: The form button needs to be of type "submit", not "button". Facepalm.</h3>

    </div>
    <div class="post-taglist">
        <a href="http://stackoverflow.com/questions/tagged/jquery" class="post-tag" title="show questions tagged &#39;jquery&#39;" rel="tag">jquery</a> <a href="http://stackoverflow.com/questions/tagged/python" class="post-tag" title="show questions tagged &#39;python&#39;" rel="tag">python</a> <a href="http://stackoverflow.com/questions/tagged/ajax" class="post-tag" title="show questions tagged &#39;ajax&#39;" rel="tag">ajax</a> <a href="http://stackoverflow.com/questions/tagged/bottle" class="post-tag" title="show questions tagged &#39;bottle&#39;" rel="tag">bottle</a> 
    </div>
    <table class="fw">
    <tbody><tr>
    <td class="vt">










<div class="post-menu"><a href="http://stackoverflow.com/q/13098494" title="short permalink to this question" class="short-link" id="link-post-13098494">share</a><span class="lsep">|</span><a href="http://stackoverflow.com/posts/13098494/edit" class="suggest-edit-post" title="">improve this question</a></div>        
    </td>
    <td align="right" class="post-signature">


    <div class="user-info user-hover">
        <div class="user-action-time">
                            <a href="http://stackoverflow.com/posts/13098494/revisions" title="show all edits to this post">edited <span title="2012-10-27 09:16:50Z" class="relativetime">Oct 27 '12 at 9:16</span></a>

        </div>
        <div class="user-gravatar32">
            <a href="http://stackoverflow.com/users/464744/blender"><div class=""><img src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/3dfd6067f4c69986a652444f44bb6d7c" alt="" width="32" height="32"></div></a>
        </div>
        <div class="user-details">
            <a href="http://stackoverflow.com/users/464744/blender">Blender</a><br>
            <span class="reputation-score" title="reputation score 86187" dir="ltr">86.2k</span><span title="7 gold badges"><span class="badge1"></span><span class="badgecount">7</span></span><span title="51 silver badges"><span class="badge2"></span><span class="badgecount">51</span></span><span title="111 bronze badges"><span class="badge3"></span><span class="badgecount">111</span></span>
        </div>
    </div>
    </td>
    <td class="post-signature owner">
        

    <div class="user-info ">
        <div class="user-action-time">
                                    asked <span title="2012-10-27 08:27:14Z" class="relativetime">Oct 27 '12 at 8:27</span>
        </div>
        <div class="user-gravatar32">
            <a href="http://stackoverflow.com/users/1342757/djentleman"><div class=""><img src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/a4c6364bf2f8e68426a903e22aeabd82" alt="" width="32" height="32"></div></a>
        </div>
        <div class="user-details">
            <a href="http://stackoverflow.com/users/1342757/djentleman">Djentleman</a><br>
            <span class="reputation-score" title="reputation score" dir="ltr">343</span><span title="1 silver badge"><span class="badge2"></span><span class="badgecount">1</span></span><span title="16 bronze badges"><span class="badge3"></span><span class="badgecount">16</span></span>
        </div>
    </div>

    </td>
    </tr>
    </tbody></table>
</div>
</td>
        </tr>


<tr>
<td class="votecell"></td>
<td>
    <div id="comments-13098494" class="comments">
        <table>
        <tbody>
                    
    <tr id="comment-17801836" class="comment">
        <td></td>
        <td class="comment-text"><div><span class="comment-copy">What is the error? Open up the developer console in eg Chrome to find it</span> –&nbsp;<a href="http://stackoverflow.com/users/390510/erik-kronberg" title="2146 reputation" class="comment-user">Erik Kronberg</a> <span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#comment17801836_13098494"><span title="2012-10-27 08:28:58Z" class="relativetime-clean">Oct 27 '12 at 8:28</span></a></span></div></td>
    </tr>
            
    <tr id="comment-17801887" class="comment">
        <td></td>
        <td class="comment-text"><div><span class="comment-copy">Whoops, sorry. <code>Failed to load resource: Resource failed to load file:///F:/ajax</code></span> –&nbsp;<a href="http://stackoverflow.com/users/1342757/djentleman" title="343 reputation" class="comment-user owner">Djentleman</a> <span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#comment17801887_13098494"><span title="2012-10-27 08:33:58Z" class="relativetime-clean">Oct 27 '12 at 8:33</span></a></span></div></td>
    </tr>

        </tbody>
    
        </table>
    </div>
    
</td>
</tr>            </tbody></table>    
</div>


<div id="answers">

    <a name="tab-top"></a>
    <div id="answers-header">
        <div class="subheader answers-subheader">
            <h2>
                    1 Answer
            </h2>
            <div id="tabs">
                <a href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle?answertab=active#tab-top" title="Answers with the latest activity first">active</a>
<a href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle?answertab=oldest#tab-top" title="Answers in the order they were provided">oldest</a>
<a class="youarehere" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle?answertab=votes#tab-top" title="Answers with the highest score first">votes</a>

            </div>
        </div>    
    </div>    




  
<a name="13098518"></a>
<div id="answer-13098518" class="answer accepted-answer" data-answerid="13098518">
    <table>
        <tbody><tr>
            <td class="votecell">
                

<div class="vote">
    <input type="hidden" value="13098518">
    <a class="vote-up-off" title="This answer is useful">up vote</a>
    <span class="vote-count-post ">1</span>
    <a class="vote-down-off" title="This answer is not useful">down vote</a>
    

            <span class="vote-accepted-on load-accepted-answer-date" title="loading when this answer was accepted...">accepted</span>
</div>

            </td>
            


<td class="answercell">
    <div class="post-text"><p><code>$("#ajaxP").load("/ajax", ...</code> sends a <code>GET</code> (not a <code>POST</code>) request to <code>/ajax</code> and replaces the content of <code>#ajaxP</code> with the response HTML.</p>

<p>You can fix your problem by changing <code>method='POST'</code> to <code>method='GET'</code> in your Python code.</p>

<p>Or you can fix your JS by preventing the form submit and sending an AJAX request instead:</p>

<pre class="default prettyprint prettyprinted" style=""><code><span class="pln">$</span><span class="pun">(</span><span class="pln">document</span><span class="pun">).</span><span class="pln">ready</span><span class="pun">(</span><span class="kwd">function</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    $</span><span class="pun">(</span><span class="str">'form'</span><span class="pun">).</span><span class="pln">submit</span><span class="pun">(</span><span class="kwd">function</span><span class="pun">(</span><span class="pln">e</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        $</span><span class="pun">.</span><span class="pln">ajax</span><span class="pun">({</span><span class="pln">
            type</span><span class="pun">:</span><span class="pln"> </span><span class="str">'POST'</span><span class="pun">,</span><span class="pln">
            url</span><span class="pun">:</span><span class="pln"> </span><span class="str">'/ajax'</span><span class="pun">,</span><span class="pln">
            data</span><span class="pun">:</span><span class="pln"> $</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">).</span><span class="pln">serialize</span><span class="pun">(),</span><span class="pln">
            success</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">response</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
                $</span><span class="pun">(</span><span class="str">'#ajaxP'</span><span class="pun">).</span><span class="pln">html</span><span class="pun">(</span><span class="pln">response</span><span class="pun">);</span><span class="pln">
            </span><span class="pun">}</span><span class="pln">
        </span><span class="pun">});</span><span class="pln">

        e</span><span class="pun">.</span><span class="pln">preventDefault</span><span class="pun">();</span><span class="pln">
    </span><span class="pun">});</span><span class="pln">
</span><span class="pun">});​</span></code></pre>
</div>
    <table class="fw">
    <tbody><tr>
    <td class="vt">










<div class="post-menu"><a href="http://stackoverflow.com/a/13098518" title="short permalink to this answer" class="short-link" id="link-post-13098518">share</a><span class="lsep">|</span><a href="http://stackoverflow.com/posts/13098518/edit" class="suggest-edit-post" title="">improve this answer</a></div>                    </td>
    <td align="right" class="post-signature">


    <div class="user-info ">
        <div class="user-action-time">
                            <a href="http://stackoverflow.com/posts/13098518/revisions" title="show all edits to this post">edited <span title="2012-10-27 08:37:09Z" class="relativetime">Oct 27 '12 at 8:37</span></a>

        </div>
        <div class="user-gravatar32">
            
        </div>
        <div class="user-details">
            <br>
            
        </div>
    </div>
    </td>
            


    <td align="right" class="post-signature">   
       

    

    <div class="user-info user-hover">
        <div class="user-action-time">
                                        answered <span title="2012-10-27 08:31:07Z" class="relativetime">Oct 27 '12 at 8:31</span>
        </div>
        <div class="user-gravatar32">
            <a href="http://stackoverflow.com/users/464744/blender"><div class=""><img src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/3dfd6067f4c69986a652444f44bb6d7c" alt="" width="32" height="32"></div></a>
        </div>
        <div class="user-details">
            <a href="http://stackoverflow.com/users/464744/blender">Blender</a><br>
            <span class="reputation-score" title="reputation score 86187" dir="ltr">86.2k</span><span title="7 gold badges"><span class="badge1"></span><span class="badgecount">7</span></span><span title="51 silver badges"><span class="badge2"></span><span class="badgecount">51</span></span><span title="111 bronze badges"><span class="badge3"></span><span class="badgecount">111</span></span>
        </div>
    </div>

    </td>
    </tr>
    </tbody></table>
</td>
        </tr>



<tr>
<td class="votecell"></td>
<td>
    <div id="comments-13098518" class="comments">
        <table>
        <tbody>
                    
    <tr id="comment-17801896" class="comment">
        <td></td>
        <td class="comment-text"><div><span class="comment-copy">Nope, that didn't fix it. Still getting the 404 resource didn't load error. And how would I go about using POST instead of GET?</span> –&nbsp;<a href="http://stackoverflow.com/users/1342757/djentleman" title="343 reputation" class="comment-user owner">Djentleman</a> <span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#comment17801896_13098518"><span title="2012-10-27 08:35:18Z" class="relativetime-clean">Oct 27 '12 at 8:35</span></a></span></div></td>
    </tr>
            
    <tr id="comment-17801927" class="comment">
        <td></td>
        <td class="comment-text"><div><span class="comment-copy">@Djentleman: See my edit.</span> –&nbsp;<a href="http://stackoverflow.com/users/464744/blender" title="86187 reputation" class="comment-user">Blender</a> <span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#comment17801927_13098518"><span title="2012-10-27 08:37:48Z" class="relativetime-clean">Oct 27 '12 at 8:37</span></a></span></div></td>
    </tr>
            
    <tr id="comment-17801939" class="comment">
        <td></td>
        <td class="comment-text"><div><span class="comment-copy">I think this would work as far as the HTML/JS side of things, but I'm still getting the <code>Failed to load resource: Resource failed to load file:///F:/ajax</code> error that I believe is caused by Bottle.</span> –&nbsp;<a href="http://stackoverflow.com/users/1342757/djentleman" title="343 reputation" class="comment-user owner">Djentleman</a> <span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#comment17801939_13098518"><span title="2012-10-27 08:38:44Z" class="relativetime-clean">Oct 27 '12 at 8:38</span></a></span></div></td>
    </tr>
            
    <tr id="comment-17801947" class="comment">
        <td></td>
        <td class="comment-text"><div><span class="comment-copy">@Djentleman: I edited the code multiple times. Does the JS code that you use match what I have in my answer?</span> –&nbsp;<a href="http://stackoverflow.com/users/464744/blender" title="86187 reputation" class="comment-user">Blender</a> <span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#comment17801947_13098518"><span title="2012-10-27 08:39:22Z" class="relativetime-clean">Oct 27 '12 at 8:39</span></a></span></div></td>
    </tr>
            
    <tr id="comment-17801973" class="comment">
        <td></td>
        <td class="comment-text"><div><span class="comment-copy">It sure does. Again, I think the problem is with Bottle. AJAX isn't finding "/ajax".</span> –&nbsp;<a href="http://stackoverflow.com/users/1342757/djentleman" title="343 reputation" class="comment-user owner">Djentleman</a> <span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#comment17801973_13098518"><span title="2012-10-27 08:41:47Z" class="relativetime-clean">Oct 27 '12 at 8:41</span></a></span></div></td>
    </tr>

        </tbody>
    
        </table>
    </div>
    <a id="comments-link-13098518" class="comments-link" data-comments-count="8" title="expand to show all comments on this post">show <b>8</b> more comments</a>
</td>
</tr>
    </tbody></table>
</div>
    <a name="new-answer"></a>
    <form id="post-form" action="http://stackoverflow.com/questions/13098494/answer/submit" method="post" class="post-form">
        <input type="hidden" id="post-id" value="13098494">
        <h2 class="space">Your Answer</h2>



    
<script type="text/javascript">
    StackExchange.ready(function() {
        initTagRenderer("".split(" "), "".split(" "));
         
        prepareEditor({
            heartbeatType: 'answer',
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
        });
        

    });  
</script>


<div id="post-editor" class="post-editor">

    <div style="position: relative;">     
        <div class="wmd-container">
            <div id="wmd-button-bar" class="wmd-button-bar"><ul id="wmd-button-row" class="wmd-button-row"><li id="wmd-bold-button" class="wmd-button" style="left: 0px;"><span style="background-position: 0px -20px;"></span></li><li id="wmd-italic-button" class="wmd-button" style="left: 25px;"><span style="background-position: -20px -20px;"></span></li><li id="wmd-spacer1" class="wmd-spacer" style="left: 50px;"><span style="background-position: -40px -20px;"></span></li><li id="wmd-link-button" class="wmd-button" style="left: 75px;"><span style="background-position: -40px -20px;"></span></li><li id="wmd-quote-button" class="wmd-button" style="left: 100px;"><span style="background-position: -60px -20px;"></span></li><li id="wmd-code-button" class="wmd-button" style="left: 125px;"><span style="background-position: -80px -20px;"></span></li><li id="wmd-image-button" class="wmd-button" style="left: 150px;"><span style="background-position: -100px -20px;"></span></li><li id="wmd-spacer2" class="wmd-spacer" style="left: 175px;"><span style="background-position: -120px -20px;"></span></li><li id="wmd-olist-button" class="wmd-button" style="left: 200px;"><span style="background-position: -120px -20px;"></span></li><li id="wmd-ulist-button" class="wmd-button" style="left: 225px;"><span style="background-position: -140px -20px;"></span></li><li id="wmd-heading-button" class="wmd-button" style="left: 250px;"><span style="background-position: -160px -20px;"></span></li><li id="wmd-hr-button" class="wmd-button" style="left: 275px;"><span style="background-position: -180px -20px;"></span></li><li id="wmd-spacer3" class="wmd-spacer" style="left: 300px;"><span style="background-position: -200px -20px;"></span></li><li id="wmd-undo-button" class="wmd-button" style="left: 325px;"><span style="background-position: -200px -20px;"></span></li><li id="wmd-redo-button" class="wmd-button" style="left: 350px;"><span style="background-position: -220px -20px;"></span></li></ul></div>
            <textarea id="wmd-input" class="wmd-input" name="post-text" cols="92" rows="15" tabindex="101" data-min-length=""></textarea>
        </div>
    </div>

    <div class="fl" style="margin-top: 8px; height:24px;">&nbsp;</div>
    <div id="draft-saved" class="draft-saved community-option fl" style="margin-top: 8px; height:24px; display:none;">draft saved</div>

    <div id="draft-discarded" class="draft-discarded community-option fl" style="margin-top: 8px; height:24px; display:none;">draft discarded</div>



    <div id="wmd-preview" class="wmd-preview"></div>
    <div></div>
    <div class="edit-block">
        <input id="fkey" name="fkey" type="hidden" value="2d0aec7595cc73e90ef39640b48e41c2">
        <input id="author" name="author" type="text">
    </div>
</div>
        <div style="position: relative;"> 
            <div class="form-item new-post-login">
        
                <div class="new-login-form">
                    <div class="new-login-left">
                        <h3>Sign up or <a id="login-link" href="http://stackoverflow.com/users/login?returnurl=%2fquestions%2f13098494%2fusing-jquery-ajax-with-pythons-bottle%23new-answer">log in</a></h3>
                        <script type="text/javascript">
                            StackExchange.ready(function () {
                                StackExchange.helpers.onClickDraftSave('#login-link');
                            });
                        </script>
                        <div class="preferred-login google-login">
                            <p><span class="icon"></span><span>Sign up using Google</span></p>
                        </div>
                        <div class="preferred-login facebook-login">
                            <p><span class="icon"></span><span>Sign up using Facebook</span></p>
                        </div>
                        <div class="preferred-login stackexchange-login">
                            <p><span class="icon"></span><span>Sign up using Stack Exchange</span></p>
                        </div>
                    </div>
                    <input type="hidden" name="manual-openid" class="manual-openid">
                    <input type="hidden" name="use-facebook" class="use-facebook" value="false">
                    <input type="button" class="submit-openid" value="Submit" style="display:none">
                    <div class="new-login-right">
                                <h3>Post as a guest</h3>
    <div class="form-item">
        <table>
        <tbody><tr>
                    <script type="text/javascript">
                StackExchange.ready(function () {
                    StackExchange.helpers.bindHelpOverlayEvents($('.vm input'));
                });
            </script>
            <td class="vm">
                <div>
                    <label for="display-name">Name</label>
                    <input id="display-name" name="display-name" type="text" size="30" maxlength="30" value="" tabindex="105">
                </div>
                <div>
                    <label for="m-address">Email</label>
                    <input id="m-address" name="m-address" type="text" size="30" maxlength="100" value="" tabindex="106">
                    <span class="edit-field-overlay">required, but not shown</span>
                </div>
            </td>
        </tr>
        </tbody></table>
    </div>

                    </div>
                </div>
            </div>
            <script type="text/javascript">
                StackExchange.ready(
                    function () {
                        StackExchange.openid.initPostLogin('.new-post-login', '%2fquestions%2f13098494%2fusing-jquery-ajax-with-pythons-bottle%23new-answer');
                    }
                );
            </script>
            <noscript>
                        &lt;h3&gt;Post as a guest&lt;/h3&gt;
    &lt;div class="form-item"&gt;
        &lt;table&gt;
        &lt;tr&gt;
                    &lt;script type="text/javascript"&gt;
                StackExchange.ready(function () {
                    StackExchange.helpers.bindHelpOverlayEvents($('.vm input'));
                });
            &lt;/script&gt;
            &lt;td class="vm"&gt;
                &lt;div&gt;
                    &lt;label for="display-name"&gt;Name&lt;/label&gt;
                    &lt;input id="display-name" name="display-name" type="text" size="30" maxlength="30" value="" tabindex="105"&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &lt;label for="m-address"&gt;Email&lt;/label&gt;
                    &lt;input id="m-address" name="m-address" type="text" size="30" maxlength="100" value="" tabindex="106"&gt;
                    &lt;span class="edit-field-overlay"&gt;required, but not shown&lt;/span&gt;
                &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;/table&gt;
    &lt;/div&gt;

            </noscript>
        </div>
           
            <div class="form-submit cbt">
            <input id="submit-button" type="submit" value="Post Your Answer" tabindex="110">
            <a href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#" class="discard-answer dno">discard</a>
    <p class="privacy-policy-agreement">
        By posting your answer, you agree to the 
        <a href="http://stackexchange.com/legal/privacy-policy" target="_blank">privacy policy</a> and 
        <a href="http://stackexchange.com/legal/terms-of-service" target="_blank">terms of service</a>.
    </p>
    <input type="hidden" name="legalLinksShown" value="1">
        </div>
    </form>



        <h2 class="bottom-notice">
                Not the answer you're looking for? 
            Browse other questions tagged <a href="http://stackoverflow.com/questions/tagged/jquery" class="post-tag" title="show questions tagged &#39;jquery&#39;" rel="tag">jquery</a> <a href="http://stackoverflow.com/questions/tagged/python" class="post-tag" title="show questions tagged &#39;python&#39;" rel="tag">python</a> <a href="http://stackoverflow.com/questions/tagged/ajax" class="post-tag" title="show questions tagged &#39;ajax&#39;" rel="tag">ajax</a> <a href="http://stackoverflow.com/questions/tagged/bottle" class="post-tag" title="show questions tagged &#39;bottle&#39;" rel="tag">bottle</a> 
                or <a href="http://stackoverflow.com/questions/ask">ask your own question</a>.
        </h2>
</div>
</div>
<div id="sidebar" class="show-votes">
        <div class="module question-stats">
        <p class="label-key">tagged</p>
        <div class="tagged"><a href="http://stackoverflow.com/questions/tagged/jquery" class="post-tag" title="show questions tagged &#39;jquery&#39;" rel="tag">jquery</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">×</span>&nbsp;<span class="item-multiplier-count">330986</span></span><br>
<a href="http://stackoverflow.com/questions/tagged/python" class="post-tag" title="show questions tagged &#39;python&#39;" rel="tag">python</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">×</span>&nbsp;<span class="item-multiplier-count">199811</span></span><br>
<a href="http://stackoverflow.com/questions/tagged/ajax" class="post-tag" title="show questions tagged &#39;ajax&#39;" rel="tag">ajax</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">×</span>&nbsp;<span class="item-multiplier-count">65114</span></span><br>
<a href="http://stackoverflow.com/questions/tagged/bottle" class="post-tag" title="show questions tagged &#39;bottle&#39;" rel="tag">bottle</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">×</span>&nbsp;<span class="item-multiplier-count">360</span></span><br>
</div>
        <table id="qinfo">
            <tbody><tr>
                <td><p class="label-key">asked</p></td>
                <td style="padding-left:10px"><p class="label-key" title="2012-10-27 08:27:14Z"><b>8 months ago</b></p></td>
            </tr>
            <tr>
                <td><p class="label-key">viewed</p></td>

                <td style="padding-left:10px">
                    <p class="label-key">
                        <b>1154 times</b>
                    </p>
                </td>
            </tr>
            <tr>
                <td><p class="label-key">active</p></td>
                <td style="padding-left:10px"><p class="label-key"><b><a href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle?lastactivity" class="lastactivity-link" title="2012-10-27 09:16:50Z">8 months ago</a></b></p></td>
            </tr>
        </tbody></table>
    </div>
        
                    <script type="text/javascript">
                    var scriptSrc = "http://engine.adzerk.net/z/8277/adzerk1_2_4_43,adzerk2_2_17_45?keywords=jquery,python,ajax,bottle";
                    if (document.referrer) {
                        if (/\?/.test(scriptSrc))
                            scriptSrc += "&";
                        else
                            scriptSrc += "?";
                        scriptSrc += "xReferrer=" + document.referrer;
                    }
                    StackExchange.ready(function() {
                        var z = document.createElement("script");
                        z.type = "text/javascript";
                        z.async = "true";
                        z.src = scriptSrc;
                        var s = document.getElementsByTagName("script")[0];
                        s.parentNode.insertBefore(z, s);
                    });
                </script>
            <div class="everyonelovesstackoverflow adzerk-vote" id="adzerk2">
            <iframe id="ados_frame_adzerk2_57618" frameborder="0" scrolling="no" height="250" width="220"></iframe><div class="adzerk-vote-controls" style="display:none;"><div class="adzerk-vote-option adzerk-vote-up"><div class="adzerk-vote-icon"></div></div><div class="adzerk-vote-option adzerk-vote-down"><div class="adzerk-vote-icon"></div></div></div><div class="adzerk-vote-survey" style="display:none;"><form><span>No problem. We won't show you that ad again. Why didn't you like it?</span><ul><li><label><input type="radio" value="12" name="downvoteReason">Uninteresting</label></li><li><label><input type="radio" value="13" name="downvoteReason">Misleading</label></li><li><label><input type="radio" value="14" name="downvoteReason">Offensive</label></li><li><label><input type="radio" value="15" name="downvoteReason">Repetitive</label></li></ul><a href="http://stackoverflow.com/questions/13098494/using-jquery-ajax-with-pythons-bottle#" class="adzerk-vote-cancel">Oops! I didn't mean to do this.</a></form></div><img height="0px" width="0px" border="0" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/i(1).gif"></div>
    <div id="hireme"> <a href="http://careers.stackoverflow.com/jobs?a=12" class="top" target="_blank"></a> <ul class="jobs"> <li> <a href="http://careers.stackoverflow.com/jobs/35713/web-developer-last-fm?a=Gc3KkG4" target="_blank" title="Web Developer at Last.fm. Click to learn more."> Web Developer<br> <span class="company">Last.fm</span> <span class="location">London, United Kingdom</span> </a> </li> <li> <a href="http://careers.stackoverflow.com/jobs/35456/mobile-web-developer-cafepress?a=FTexLOM" target="_blank" title="Mobile Web Developer at CafePress. Click to learn more."> Mobile Web Developer<br> <span class="company">CafePress</span> <span class="location">San Mateo, CA</span> </a> </li> <li> <a href="http://careers.stackoverflow.com/jobs/35956/information-and-scientific-visualization-developer-kitware?a=GtRmKoU" target="_blank" title="Information and Scientific Visualization Developer at Kitware. Click to learn more."> Information and Scientific Visualization Developer<br> <span class="company">Kitware</span> <span class="location">Clifton Park Center, NY</span> </a> </li> </ul> <img alt="" class="impression" src="./Using jQuery AJAX with Python's Bottle - Stack Overflow_files/Gc3KkG4-FTexLOM-GtRmKoU-12" style="display:none"></div>



    
  
    
    <div class="module sidebar-related">
        <h4 id="h-related">Related</h4>
        <div class="related" data-tracker="rq=1">
            <div class="spacer">
<a href="http://stackoverflow.com/q/166221?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes large">654</div>
</a>
<a href="http://stackoverflow.com/questions/166221/how-can-i-upload-files-asynchronously-with-jquery?rq=1" class="question-hyperlink">How can I upload files asynchronously with jQuery?</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/9166293?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes answered-accepted default">6</div>
</a>
<a href="http://stackoverflow.com/questions/9166293/ajax-submission-form-using-bottle-python?rq=1" class="question-hyperlink">AJAX Submission Form using Bottle (Python)</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/10563998?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes answered-accepted default">0</div>
</a>
<a href="http://stackoverflow.com/questions/10563998/extjs-ajax-response-with-python-bottle?rq=1" class="question-hyperlink">extjs ajax response with python bottle</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/10885429?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes answered-accepted default">1</div>
</a>
<a href="http://stackoverflow.com/questions/10885429/static-files-in-a-bottle-application-cannot-be-found-404?rq=1" class="question-hyperlink">Static files in a Bottle application cannot be found (404)</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/11515351?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes answered-accepted default">0</div>
</a>
<a href="http://stackoverflow.com/questions/11515351/bottle-response-does-not-trigger-ajax-callback?rq=1" class="question-hyperlink">Bottle response does not trigger ajax callback</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/11805756?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes answered-accepted default">8</div>
</a>
<a href="http://stackoverflow.com/questions/11805756/minimal-example-of-pythons-bottle-microframework-using-gevent-socketio-and-sock?rq=1" class="question-hyperlink">minimal example of Python's bottle microframework using gevent-socketio and Socket.IO.js</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/13107535?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes answered-accepted default">1</div>
</a>
<a href="http://stackoverflow.com/questions/13107535/using-asynchronous-post-requests-with-pythons-bottle?rq=1" class="question-hyperlink">Using asynchronous POST requests with Python's Bottle?</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/13786751?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes default">1</div>
</a>
<a href="http://stackoverflow.com/questions/13786751/python-bottle-form-response-handling?rq=1" class="question-hyperlink">Python bottle form response handling</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/16395206?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes answered-accepted default">0</div>
</a>
<a href="http://stackoverflow.com/questions/16395206/posting-to-bottle-server-how-do-i-get-the-request-data?rq=1" class="question-hyperlink">Posting to Bottle server. How do I get the request data?</a>
</div>
<div class="spacer">
<a href="http://stackoverflow.com/q/17262170?rq=1" title="Vote score (upvotes - downvotes)">
        <div class="answer-votes answered-accepted default">1</div>
</a>
<a href="http://stackoverflow.com/questions/17262170/bottle-py-enabling-cors-for-jquery-ajax-requests?rq=1" class="question-hyperlink">Bottle Py: Enabling CORS for jQuery AJAX requests</a>
</div>

        </div>
    </div>
</div>

<div id="feed-link">
    <div id="feed-link-text"><a href="http://stackoverflow.com/feeds/question/13098494" title="feed of this question and its answers"><span class="feed-icon"></span>question feed</a></div>
</div>
<script type="text/javascript">
StackExchange.ready(function(){$.get('/posts/13098494/ivc/8ec7');});
</script>
<noscript>
    &lt;div&gt;&lt;img src="/posts/13098494/ivc/8ec7" class="dno" alt="" width="0" height="0"&gt;&lt;/div&gt;
</noscript><div style="display:none" id="prettify-lang">default</div></div>


        </div>
    </div>
    <div id="footer" class="categories">
        <div class="footerwrap">
            <div id="footer-menu">
                <div class="top-footer-links">
                        <a href="http://stackoverflow.com/about">about</a>
                    <a href="http://stackoverflow.com/help">help</a>
                        <a href="http://stackoverflow.com/help/badges">badges</a>
                    <a href="http://blog.stackexchange.com/?blb=1">blog</a>
                        <a href="http://chat.stackoverflow.com/">chat</a>
                    <a href="http://data.stackexchange.com/">data</a>
                    <a href="http://stackexchange.com/legal">legal</a>
                    <a href="http://stackexchange.com/legal/privacy-policy">privacy policy</a>
                    <a href="http://stackexchange.com/about/hiring">jobs</a>
                    <a href="http://engine.adzerk.net/redirect/0/2776/2751/0/4de3c60f719c4dfcb1a57531c7050090/0">advertising info</a>

                    <a onclick="StackExchange.switchMobile(&quot;on&quot;, &quot;/questions/13098494/using-jquery-ajax-with-pythons-bottle&quot;)">mobile</a>
                    <b><a href="http://stackoverflow.com/contact">contact us</a></b>
                        <b><a href="http://meta.stackoverflow.com/">feedback</a></b>
                </div>
                <div id="footer-sites">
                <table>
    <tbody><tr>
            <th colspan="3">
                Technology
            </th>
            <th>
                Life / Arts
            </th>
            <th>
                Culture / Recreation
            </th>
            <th>
                Science
            </th>
            <th>
                Other
            </th>
    </tr>
    <tr>
            <td>
                <ol>
                        <li><a href="http://stackoverflow.com/" title="professional and enthusiast programmers">Stack Overflow</a></li>
                        <li><a href="http://serverfault.com/" title="professional system and network administrators">Server Fault</a></li>
                        <li><a href="http://superuser.com/" title="computer enthusiasts and power users">Super User</a></li>
                        <li><a href="http://webapps.stackexchange.com/" title="power users of web applications">Web Applications</a></li>
                        <li><a href="http://askubuntu.com/" title="Ubuntu users and developers">Ask Ubuntu</a></li>
                        <li><a href="http://webmasters.stackexchange.com/" title="pro webmasters">Webmasters</a></li>
                        <li><a href="http://gamedev.stackexchange.com/" title="professional and independent game developers">Game Development</a></li>
                        <li><a href="http://tex.stackexchange.com/" title="users of TeX, LaTeX, ConTeXt, and related typesetting systems">TeX - LaTeX</a></li>
                            </ol></td><td><ol>
                        <li><a href="http://programmers.stackexchange.com/" title="professional programmers interested in conceptual questions about software development">Programmers</a></li>
                        <li><a href="http://unix.stackexchange.com/" title="users of Linux, FreeBSD and other Un*x-like operating systems.">Unix &amp; Linux</a></li>
                        <li><a href="http://apple.stackexchange.com/" title="power users of Apple hardware and software">Ask Different (Apple)</a></li>
                        <li><a href="http://wordpress.stackexchange.com/" title="WordPress developers and administrators">WordPress Answers</a></li>
                        <li><a href="http://gis.stackexchange.com/" title="cartographers, geographers and GIS professionals">Geographic Information Systems</a></li>
                        <li><a href="http://electronics.stackexchange.com/" title="electronics and electrical engineering professionals, students, and enthusiasts">Electrical Engineering</a></li>
                        <li><a href="http://android.stackexchange.com/" title="enthusiasts and power users of the Android operating system">Android Enthusiasts</a></li>
                        <li><a href="http://security.stackexchange.com/" title="IT security professionals">IT Security</a></li>
                            </ol></td><td><ol>
                        <li><a href="http://dba.stackexchange.com/" title="database professionals who wish to improve their database skills and learn from others in the community">Database Administrators</a></li>
                        <li><a href="http://drupal.stackexchange.com/" title="Drupal developers and administrators">Drupal Answers</a></li>
                        <li><a href="http://sharepoint.stackexchange.com/" title="SharePoint enthusiasts">SharePoint</a></li>
                        <li><a href="http://ux.stackexchange.com/" title="user experience researchers and experts">User Experience</a></li>
                        <li><a href="http://mathematica.stackexchange.com/" title="users of Mathematica">Mathematica</a></li>
                    
                        <li>
                            <a href="http://stackexchange.com/sites#technology" class="more">
                                more (13)
                            </a>
                        </li>
                </ol>
            </td>
            <td>
                <ol>
                        <li><a href="http://photo.stackexchange.com/" title="professional, enthusiast and amateur photographers">Photography</a></li>
                        <li><a href="http://scifi.stackexchange.com/" title="science fiction and fantasy enthusiasts">Science Fiction &amp; Fantasy</a></li>
                        <li><a href="http://cooking.stackexchange.com/" title="professional and amateur chefs">Seasoned Advice (cooking)</a></li>
                        <li><a href="http://diy.stackexchange.com/" title="contractors and serious DIYers">Home Improvement</a></li>
                    
                        <li>
                            <a href="http://stackexchange.com/sites#lifearts" class="more">
                                more (13)
                            </a>
                        </li>
                </ol>
            </td>
            <td>
                <ol>
                        <li><a href="http://english.stackexchange.com/" title="linguists, etymologists, and serious English language enthusiasts">English Language &amp; Usage</a></li>
                        <li><a href="http://skeptics.stackexchange.com/" title="scientific skepticism">Skeptics</a></li>
                        <li><a href="http://judaism.stackexchange.com/" title="those who base their lives on Jewish law and tradition and anyone interested in learning more">Mi Yodeya (Judaism)</a></li>
                        <li><a href="http://travel.stackexchange.com/" title="road warriors and seasoned travelers">Travel</a></li>
                        <li><a href="http://christianity.stackexchange.com/" title="committed Christians, experts in Christianity and those interested in learning more">Christianity</a></li>
                        <li><a href="http://gaming.stackexchange.com/" title="passionate videogamers on all platforms">Arqade (gaming)</a></li>
                        <li><a href="http://bicycles.stackexchange.com/" title="people who build and repair bicycles, people who train cycling, or commute on bicycles">Bicycles</a></li>
                        <li><a href="http://rpg.stackexchange.com/" title="gamemasters and players of tabletop, paper-and-pencil role-playing games">Role-playing Games</a></li>
                    
                        <li>
                            <a href="http://stackexchange.com/sites#culturerecreation" class="more">
                                more (21)
                            </a>
                        </li>
                </ol>
            </td>
            <td>
                <ol>
                        <li><a href="http://mathoverflow.net/" title="mathematicians">MathOverflow</a></li>
                        <li><a href="http://math.stackexchange.com/" title="people studying math at any level and professionals in related fields">Mathematics</a></li>
                        <li><a href="http://stats.stackexchange.com/" title="statisticians, data analysts, data miners and data visualization experts">Cross Validated (stats)</a></li>
                        <li><a href="http://cstheory.stackexchange.com/" title="theoretical computer scientists and researchers in related fields">Theoretical Computer Science</a></li>
                        <li><a href="http://physics.stackexchange.com/" title="active researchers, academics and students of physics">Physics</a></li>
                    
                        <li>
                            <a href="http://stackexchange.com/sites#science" class="more">
                                more (7)
                            </a>
                        </li>
                </ol>
            </td>
            <td>
                <ol>
                        <li><a href="http://stackapps.com/" title="apps, scripts, and development with the Stack Exchange API">Stack Apps</a></li>
                        <li><a href="http://meta.stackoverflow.com/" title="meta-discussion of the Stack Exchange family of Q&amp;A websites">Meta Stack Overflow</a></li>
                        <li><a href="http://area51.stackexchange.com/" title="proposing new sites in the Stack Exchange network">Area 51</a></li>
                        <li><a href="http://careers.stackoverflow.com/">Stack Overflow Careers</a></li>
                    
                </ol>
            </td>
    </tr>
</tbody></table>
                </div>
            </div>

            <div id="copyright">
                site design / logo © 2013 stack exchange inc; 
                user contributions licensed under <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">cc-wiki</a> 
                with <a href="http://blog.stackoverflow.com/2009/06/attribution-required/" rel="license">attribution required</a>
            </div>
            <div id="footer-flair">
                <a href="http://creativecommons.org/licenses/by-sa/3.0/" class="cc-wiki-link"></a>
            </div>
            <div id="svnrev">
                rev 2013.6.28.789
            </div>
            
        </div>
    </div>
    <noscript>
        &lt;div id="noscript-warning"&gt;Stack Overflow works best with JavaScript enabled&lt;img src="http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif" alt="" class="dno"&gt;&lt;/div&gt;
    </noscript>
    <script type="text/javascript">var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-5620270-1']);
        _gaq.push(['_setCustomVar', 1, 'tags', '|jquery|python|ajax|bottle|']); 
_gaq.push(['_trackPageview']);
    var _qevents = _qevents || [];
    (function(){
        var s=document.getElementsByTagName('script')[0];
        var ga=document.createElement('script');
        ga.type='text/javascript';
        ga.async=true;
        ga.src='http://www.google-analytics.com/ga.js';
        s.parentNode.insertBefore(ga,s);
        var sc=document.createElement('script');
        sc.type='text/javascript';
        sc.async=true;
        sc.src='http://edge.quantserve.com/quant.js'; 
        s.parentNode.insertBefore(sc,s);
    })();
    </script>
    <script type="text/javascript">
        _qevents.push({ qacct: "p-c1rF4kxgLUzNc" });
    </script>        
    

</body></html>